import request from '@/router/axios';

export function fetchList(query) {
    return request({
        url: '/base/page',
        method: 'get',
        params: query
    });
}

export function addObj(obj) {
    return request({
        url: '/base/',
        method: 'post',
        data: obj
    });
}

export function getObj(id) {
    return request({
        url: '/base/' + id,
        method: 'get'
    });
}

export function delObj(id) {
    return request({
        url: '/base/' + id,
        method: 'delete'
    });
}

export function putObj(obj) {
    return request({
        url: '/base/',
        method: 'put',
        data: obj
    });
}

export function delBatchObj(idList) {
	return request({
		url: '/mes/delBatch/' + idList,
		method: 'delete'
	});
}